// 设置用户名密码并且上传头像，提交后输出

var url = require('url');
var querystring = require('querystring');

function result(request, response) {
    
    // post
    var postData = '';
    request.addListener('data', chunk => postData += chunk);
    request.addListener('end', function() {
        // console.log(postData);
        var data = querystring.parse(postData);
        
        var html = '\
        <p>用户名：'+data.account+'</p>\
        <p>密码：'+data.password+'</p>\
        <p>图片：</p>\
        ';

        response.writeHead(200, {'content-type': 'text/html'});
        response.write(html);
        response.end();
    })


}

exports.result = result;